package by.grsu.epam.service.entitiesservice.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import by.grsu.epam.dao.GenericDAO;
import by.grsu.epam.dao.entitiesdao.AccountDAO;
import by.grsu.epam.domain.account.Account;
import by.grsu.epam.service.GenericServiceImpl;
import by.grsu.epam.service.entitiesservice.AccountService;

@Service
public class AccountServiceImpl extends GenericServiceImpl<Account, Long> implements AccountService {
	
	@Autowired
	private AccountDAO accountDAO;
	
	@Override
	public GenericDAO<Account, Long> getDAO() {
		return accountDAO;
	}

	@Override
	@Transactional
	public List<Account> findBySubscriberUsername(String username) {
		return accountDAO.findBySubscriberUsername(username);
	}
	
}
